package com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.repository;

import com.slz3.business.frame.module.Repositorys;
import com.slz3.business.frame.util.VE;
import com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.domain.GooBaseGoodsSpecification;
import com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.domain.GooBaseGoodsSpecificationCondition;
import com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.steward.GooBaseGoodsSpecificationSpecification;

import java.util.List;
import java.util.UUID;

public class GooBaseGoodsSpecificationCustomizedRepositoryImpl implements GooBaseGoodsSpecificationCustomizedRepository {

    @Override
    public void test() {
        System.err.println(Repositorys.gooBaseGoodsSpecification);
        System.err.println("test: customized repository");
    }

    @Override
    public List<GooBaseGoodsSpecification> findByFkGooBaseGoods(List<UUID> uuidList) {

        if (VE.isEmpty(uuidList)) {
            return null;
        }

        GooBaseGoodsSpecificationCondition condition = new GooBaseGoodsSpecificationCondition();
        condition.setFkGooBaseGoodsList(uuidList);

        return Repositorys.gooBaseGoodsSpecification.findAll(GooBaseGoodsSpecificationSpecification.findJoin(condition));

    }

}
